package com.example.writer;

import com.example.entity.Person;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.item.ItemWriter;

import java.util.List;

/**
 * @description
 * @author: ruanchengzhi
 * @create: 2021-07-29 20:15
 **/
public class BatchWriter implements ItemWriter<Person> {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    public void write(List<? extends Person> list) throws Exception {
        logger.info("[op:batchWriter] write data [{}]", list.toString());
    }
}
